bits 32

global __int0
global __int1
global __int2
global __int3
global __int4
global __int5
global __int6
global __int7
global __int8
global __int9
global __int10
global __int11
global __int12
global __int13
global __int14
global __int15
global __int16
global __int17
global __int18
global __int19
global __int20
global __int21
global __int22
global __int23
global __int24
global __int25
global __int26
global __int27
global __int28
global __int29
global __int30
global __int31
global __int32
global __int33
global __int34
global __int35
global __int36
global __int37
global __int38
global __int39
global __int40
global __int41
global __int42
global __int43
global __int44
global __int45
global __int46
global __int47
global __int48
global __int49
global __int50
global __int51
global __int52
global __int53
global __int54
global __int55
global __int56
global __int57
global __int58
global __int59
global __int60
global __int61
global __int62
global __int63
global __int64
global __int65
global __int66
global __int67
global __int68
global __int69
global __int70
global __int71
global __int72
global __int73
global __int74
global __int75
global __int76
global __int77
global __int78
global __int79
global __int80
global __int81
global __int82
global __int83
global __int84
global __int85
global __int86
global __int87
global __int88
global __int89
global __int90
global __int91
global __int92
global __int93
global __int94
global __int95
global __int96
global __int97
global __int98
global __int99
global __int100
global __int101
global __int102
global __int103
global __int104
global __int105
global __int106
global __int107
global __int108
global __int109
global __int110
global __int111
global __int112
global __int113
global __int114
global __int115
global __int116
global __int117
global __int118
global __int119
global __int120
global __int121
global __int122
global __int123
global __int124
global __int125
global __int126
global __int127
global __int128
global __int129
global __int130
global __int131
global __int132
global __int133
global __int134
global __int135
global __int136
global __int137
global __int138
global __int139
global __int140
global __int141
global __int142
global __int143
global __int144
global __int145
global __int146
global __int147
global __int148
global __int149
global __int150
global __int151
global __int152
global __int153
global __int154
global __int155
global __int156
global __int157
global __int158
global __int159
global __int160
global __int161
global __int162
global __int163
global __int164
global __int165
global __int166
global __int167
global __int168
global __int169
global __int170
global __int171
global __int172
global __int173
global __int174
global __int175
global __int176
global __int177
global __int178
global __int179
global __int180
global __int181
global __int182
global __int183
global __int184
global __int185
global __int186
global __int187
global __int188
global __int189
global __int190
global __int191
global __int192
global __int193
global __int194
global __int195
global __int196
global __int197
global __int198
global __int199
global __int200
global __int201
global __int202
global __int203
global __int204
global __int205
global __int206
global __int207
global __int208
global __int209
global __int210
global __int211
global __int212
global __int213
global __int214
global __int215
global __int216
global __int217
global __int218
global __int219
global __int220
global __int221
global __int222
global __int223
global __int224
global __int225
global __int226
global __int227
global __int228
global __int229
global __int230
global __int231
global __int232
global __int233
global __int234
global __int235
global __int236
global __int237
global __int238
global __int239
global __int240
global __int241
global __int242
global __int243
global __int244
global __int245
global __int246
global __int247
global __int248
global __int249
global __int250
global __int251
global __int252
global __int253
global __int254
global __int255

extern int0
extern int1
extern int2
extern int3
extern int4
extern int5
extern int6
extern int7
extern int8
extern int9
extern int10
extern int11
extern int12
extern int13
extern int14
extern int15
extern int16
extern int17
extern int18
extern int19
extern int20
extern int21
extern int22
extern int23
extern int24
extern int25
extern int26
extern int27
extern int28
extern int29
extern int30
extern int31
extern int32
extern int33
extern int34
extern int35
extern int36
extern int37
extern int38
extern int39
extern int40
extern int41
extern int42
extern int43
extern int44
extern int45
extern int46
extern int47
extern int48
extern int49
extern int50
extern int51
extern int52
extern int53
extern int54
extern int55
extern int56
extern int57
extern int58
extern int59
extern int60
extern int61
extern int62
extern int63
extern int64
extern int65
extern int66
extern int67
extern int68
extern int69
extern int70
extern int71
extern int72
extern int73
extern int74
extern int75
extern int76
extern int77
extern int78
extern int79
extern int80
extern int81
extern int82
extern int83
extern int84
extern int85
extern int86
extern int87
extern int88
extern int89
extern int90
extern int91
extern int92
extern int93
extern int94
extern int95
extern int96
extern int97
extern int98
extern int99
extern int100
extern int101
extern int102
extern int103
extern int104
extern int105
extern int106
extern int107
extern int108
extern int109
extern int110
extern int111
extern int112
extern int113
extern int114
extern int115
extern int116
extern int117
extern int118
extern int119
extern int120
extern int121
extern int122
extern int123
extern int124
extern int125
extern int126
extern int127
extern int128
extern int129
extern int130
extern int131
extern int132
extern int133
extern int134
extern int135
extern int136
extern int137
extern int138
extern int139
extern int140
extern int141
extern int142
extern int143
extern int144
extern int145
extern int146
extern int147
extern int148
extern int149
extern int150
extern int151
extern int152
extern int153
extern int154
extern int155
extern int156
extern int157
extern int158
extern int159
extern int160
extern int161
extern int162
extern int163
extern int164
extern int165
extern int166
extern int167
extern int168
extern int169
extern int170
extern int171
extern int172
extern int173
extern int174
extern int175
extern int176
extern int177
extern int178
extern int179
extern int180
extern int181
extern int182
extern int183
extern int184
extern int185
extern int186
extern int187
extern int188
extern int189
extern int190
extern int191
extern int192
extern int193
extern int194
extern int195
extern int196
extern int197
extern int198
extern int199
extern int200
extern int201
extern int202
extern int203
extern int204
extern int205
extern int206
extern int207
extern int208
extern int209
extern int210
extern int211
extern int212
extern int213
extern int214
extern int215
extern int216
extern int217
extern int218
extern int219
extern int220
extern int221
extern int222
extern int223
extern int224
extern int225
extern int226
extern int227
extern int228
extern int229
extern int230
extern int231
extern int232
extern int233
extern int234
extern int235
extern int236
extern int237
extern int238
extern int239
extern int240
extern int241
extern int242
extern int243
extern int244
extern int245
extern int246
extern int247
extern int248
extern int249
extern int250
extern int251
extern int252
extern int253
extern int254
extern int255

;global IDT
;global IDT_TABLE

;setup_idt:
;	mov eax, idt0
;	xchg bx,bx
;	mov [IDT_TABLE], ax
;
;	mov bx, 0x0008
;	mov [IDT_TABLE+2], bx
;	
;	xor bx,bx
;	mov [IDT_TABLE+4], al
;	
;	mov bl, 0x8E
;	mov [IDT_TABLE+5], bl
;	
;	mov cl, 16
;	shr eax, cl
;	mov [IDT_TABLE+6], ax
;	ret

;IDT DW (256*8)-1
;	DD IDT_TABLE

;SECTION .data
;IDT_TABLE times 256*8 db 0

__int0:
	call int0
	iret

__int1:
	call int1
	iret

__int2:
	call int2
	iret

__int3:
	call int3
	iret

__int4:
	call int4
	iret

__int5:
	call int5
	iret

__int6:
	call int6
	iret

__int7:
	call int7
	iret

__int8:
	call int8
	iret

__int9:
	call int9
	iret

__int10:
	call int10
	iret

__int11:
	call int11
	iret

__int12:
	call int12
	iret

__int13:
	call int13
	iret

__int14:
	call int14
	iret

__int15:
	call int15
	iret

__int16:
	call int16
	iret

__int17:
	call int17
	iret

__int18:
	call int18
	iret

__int19:
	call int19
	iret

__int20:
	call int20
	iret

__int21:
	call int21
	iret

__int22:
	call int22
	iret

__int23:
	call int23
	iret

__int24:
	call int24
	iret

__int25:
	call int25
	iret

__int26:
	call int26
	iret

__int27:
	call int27
	iret

__int28:
	call int28
	iret

__int29:
	call int29
	iret

__int30:
	call int30
	iret

__int31:
	call int31
	iret

__int32:
	call int32
	mov al, 0x20
	out 0x20, al
	iret

__int33:
	call int33
	in  al, 0x60 ; ler o buffer do teclado
	
	mov al, 0x20
	out 0x20, al

	iret

__int34:
	call int34
	iret

__int35:
	call int35
	iret

__int36:
	call int36
	iret

__int37:
	call int37
	iret

__int38:
	call int38
	iret

__int39:
	call int39
	iret

__int40:
	call int40
	iret

__int41:
	call int41
	iret

__int42:
	call int42
	iret

__int43:
	call int43
	iret

__int44:
	call int44
	iret

__int45:
	call int45
	iret

__int46:
	call int46
	iret

__int47:
	call int47
	iret

__int48:
	call int48
	iret

__int49:
	call int49
	iret

__int50:
	call int50
	iret

__int51:
	call int51
	iret

__int52:
	call int52
	iret

__int53:
	call int53
	iret

__int54:
	call int54
	iret

__int55:
	call int55
	iret

__int56:
	call int56
	iret

__int57:
	call int57
	iret

__int58:
	call int58
	iret

__int59:
	call int59
	iret

__int60:
	call int60
	iret

__int61:
	call int61
	iret

__int62:
	call int62
	iret

__int63:
	call int63
	iret

__int64:
	call int64
	iret

__int65:
	call int65
	iret

__int66:
	call int66
	iret

__int67:
	call int67
	iret

__int68:
	call int68
	iret

__int69:
	call int69
	iret

__int70:
	call int70
	iret

__int71:
	call int71
	iret

__int72:
	call int72
	iret

__int73:
	call int73
	iret

__int74:
	call int74
	iret

__int75:
	call int75
	iret

__int76:
	call int76
	iret

__int77:
	call int77
	iret

__int78:
	call int78
	iret

__int79:
	call int79
	iret

__int80:
	call int80
	iret

__int81:
	call int81
	iret

__int82:
	call int82
	iret

__int83:
	call int83
	iret

__int84:
	call int84
	iret

__int85:
	call int85
	iret

__int86:
	call int86
	iret

__int87:
	call int87
	iret

__int88:
	call int88
	iret

__int89:
	call int89
	iret

__int90:
	call int90
	iret

__int91:
	call int91
	iret

__int92:
	call int92
	iret

__int93:
	call int93
	iret

__int94:
	call int94
	iret

__int95:
	call int95
	iret

__int96:
	call int96
	iret

__int97:
	call int97
	iret

__int98:
	call int98
	iret

__int99:
	call int99
	iret

__int100:
	call int100
	iret

__int101:
	call int101
	iret

__int102:
	call int102
	iret

__int103:
	call int103
	iret

__int104:
	call int104
	iret

__int105:
	call int105
	iret

__int106:
	call int106
	iret

__int107:
	call int107
	iret

__int108:
	call int108
	iret

__int109:
	call int109
	iret

__int110:
	call int110
	iret

__int111:
	call int111
	iret

__int112:
	call int112
	iret

__int113:
	call int113
	iret

__int114:
	call int114
	iret

__int115:
	call int115
	iret

__int116:
	call int116
	iret

__int117:
	call int117
	iret

__int118:
	call int118
	iret

__int119:
	call int119
	iret

__int120:
	call int120
	iret

__int121:
	call int121
	iret

__int122:
	call int122
	iret

__int123:
	call int123
	iret

__int124:
	call int124
	iret

__int125:
	call int125
	iret

__int126:
	call int126
	iret

__int127:
	call int127
	iret

__int128:
	call int128
	iret

__int129:
	call int129
	iret

__int130:
	call int130
	iret

__int131:
	call int131
	iret

__int132:
	call int132
	iret

__int133:
	call int133
	iret

__int134:
	call int134
	iret

__int135:
	call int135
	iret

__int136:
	call int136
	iret

__int137:
	call int137
	iret

__int138:
	call int138
	iret

__int139:
	call int139
	iret

__int140:
	call int140
	iret

__int141:
	call int141
	iret

__int142:
	call int142
	iret

__int143:
	call int143
	iret

__int144:
	call int144
	iret

__int145:
	call int145
	iret

__int146:
	call int146
	iret

__int147:
	call int147
	iret

__int148:
	call int148
	iret

__int149:
	call int149
	iret

__int150:
	call int150
	iret

__int151:
	call int151
	iret

__int152:
	call int152
	iret

__int153:
	call int153
	iret

__int154:
	call int154
	iret

__int155:
	call int155
	iret

__int156:
	call int156
	iret

__int157:
	call int157
	iret

__int158:
	call int158
	iret

__int159:
	call int159
	iret

__int160:
	call int160
	iret

__int161:
	call int161
	iret

__int162:
	call int162
	iret

__int163:
	call int163
	iret

__int164:
	call int164
	iret

__int165:
	call int165
	iret

__int166:
	call int166
	iret

__int167:
	call int167
	iret

__int168:
	call int168
	iret

__int169:
	call int169
	iret

__int170:
	call int170
	iret

__int171:
	call int171
	iret

__int172:
	call int172
	iret

__int173:
	call int173
	iret

__int174:
	call int174
	iret

__int175:
	call int175
	iret

__int176:
	call int176
	iret

__int177:
	call int177
	iret

__int178:
	call int178
	iret

__int179:
	call int179
	iret

__int180:
	call int180
	iret

__int181:
	call int181
	iret

__int182:
	call int182
	iret

__int183:
	call int183
	iret

__int184:
	call int184
	iret

__int185:
	call int185
	iret

__int186:
	call int186
	iret

__int187:
	call int187
	iret

__int188:
	call int188
	iret

__int189:
	call int189
	iret

__int190:
	call int190
	iret

__int191:
	call int191
	iret

__int192:
	call int192
	iret

__int193:
	call int193
	iret

__int194:
	call int194
	iret

__int195:
	call int195
	iret

__int196:
	call int196
	iret

__int197:
	call int197
	iret

__int198:
	call int198
	iret

__int199:
	call int199
	iret

__int200:
	call int200
	iret

__int201:
	call int201
	iret

__int202:
	call int202
	iret

__int203:
	call int203
	iret

__int204:
	call int204
	iret

__int205:
	call int205
	iret

__int206:
	call int206
	iret

__int207:
	call int207
	iret

__int208:
	call int208
	iret

__int209:
	call int209
	iret

__int210:
	call int210
	iret

__int211:
	call int211
	iret

__int212:
	call int212
	iret

__int213:
	call int213
	iret

__int214:
	call int214
	iret

__int215:
	call int215
	iret

__int216:
	call int216
	iret

__int217:
	call int217
	iret

__int218:
	call int218
	iret

__int219:
	call int219
	iret

__int220:
	call int220
	iret

__int221:
	call int221
	iret

__int222:
	call int222
	iret

__int223:
	call int223
	iret

__int224:
	call int224
	iret

__int225:
	call int225
	iret

__int226:
	call int226
	iret

__int227:
	call int227
	iret

__int228:
	call int228
	iret

__int229:
	call int229
	iret

__int230:
	call int230
	iret

__int231:
	call int231
	iret

__int232:
	call int232
	iret

__int233:
	call int233
	iret

__int234:
	call int234
	iret

__int235:
	call int235
	iret

__int236:
	call int236
	iret

__int237:
	call int237
	iret

__int238:
	call int238
	iret

__int239:
	call int239
	iret

__int240:
	call int240
	iret

__int241:
	call int241
	iret

__int242:
	call int242
	iret

__int243:
	call int243
	iret

__int244:
	call int244
	iret

__int245:
	call int245
	iret

__int246:
	call int246
	iret

__int247:
	call int247
	iret

__int248:
	call int248
	iret

__int249:
	call int249
	iret

__int250:
	call int250
	iret

__int251:
	call int251
	iret

__int252:
	call int252
	iret

__int253:
	call int253
	iret

__int254:
	call int254
	iret

__int255:
	call int255
	iret

